This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Frontend Testing Added #13
Draft
ValeriaLG
wants to merge
13
commits into
main
Choose a base branch
from
frontend-testing-experimental
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Made it so that the tests check if it's in the same day before doing the test
* Added another expect clause to the single panel first test * Added another test for unfiltered full panel display * Added a test to clear intervals
* Adds initial test files to achieve 100 percent code coverage for Clock, Loading and Map * Adds a few instanbul ignore comments above the loading ternary statement due to it being unreachable but adding to the untested lines count and to the top of the cleanPanelInfoTimes function since the argument defaults add to multiple branches and removing the defaults doesn't lower code coverage
* Excluded index.js, reportWebVitals.js, and setupTests.js from the code coverage report due to their irrelevance * Added a React import at the top of App.js * Added a test file for App.js called App.spec.js to just look and see if the component renders
* Added another unit test to advance timers in the app to see if the setInterval in Main changes what is displayed * Added another expect clause to Correc time & panel name is displayed to include a check for the panel name * Reset what is changed for the newly added unit test the unix times to what they originally were * Updated the checks date unit test in the Clock.spec.js file to have it's test updated with the current day since it was failing for any hard text days
* Added jest.useRealtimers in the afterEach parts of tests so that it's properly cleaned up between tests
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tests the functionality of the schedule filtering between the following endpoints:
** MAGES+1 can be any panel name as long as it's concatenated with a + plus sign
After NPM installing the testing packages, you can run the tests by typing
npm test
or to see the test coverage, you can typenpx jest --coverage --colors
.A few things to note: